package com.zainzhou.dao.repository;

import com.zainzhou.dao.entity.UserEntity;
import com.zainzhou.dao.mapper.UserMapper;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

/**
 * @author : 周振宇
 * Created on 2024/06/19 11:20
 **/
@Repository
public class UserRepository {
    @Resource
    private UserMapper userMapper;

    public UserEntity login(String username, String password){
        return userMapper.login(username, password);
    }

    public int createUser(UserEntity user){
        return userMapper.createUser(user);
    }

    public  int updateUser(UserEntity user){
        return userMapper.updateUser(user);
    }

    public  int deleteUser(String id){
        return userMapper.deleteUser(id);
    }

    public UserEntity queryUserById(String id){
        return userMapper.queryUserById(id);
    }
}
